﻿using System;
using DevExpress.Xpo;

namespace Aij1.Model
{

    public class B_OrderItem : XPObject
    {
        public B_OrderItem(Session session)
            : base(session)
        {
            // This constructor is used when an object is loaded from a persistent storage.
            // Do not place any code here.
        }

        public override void AfterConstruction()
        {
            base.AfterConstruction();
            // Place here your initialization code.
        }

        B_Series fSeriesId;
        public B_Series SeriesId
        {
            get { return fSeriesId; }
            set { SetPropertyValue<B_Series>("SeriesId", ref fSeriesId, value); }
        }

        B_Order fOrderId;
        [Association("O-I")]
        public B_Order OrderId
        {
            get { return fOrderId; }
            set { SetPropertyValue<B_Order>("OrderId", ref fOrderId, value); }
        }

        int fCount;
        public int Count
        {
            get { return fCount; }
            set { SetPropertyValue<int>("Count", ref fCount, value); }
        }

        int fPrice;
        public int Price
        {
            get { return fPrice; }
            set { SetPropertyValue<int>("Price", ref fPrice, value); }
        }

        //DateTime fOrderTime;
        //public DateTime OrderTime
        //{
        //    get { return fOrderTime; }
        //    set { SetPropertyValue<DateTime>("OrderTime", ref fOrderTime, value); }
        //}

        //Guid fOrderId;
        //[Indexed(Unique = true)]
        //public Guid OrderId
        //{
        //    get { return fOrderId; }
        //    set { SetPropertyValue<Guid>("OrderId", ref fOrderId, value); }
        //}
    }

}